exports.checkingUserStatus = function (req, res) {

    //获取参数信息
    var bodyParams = req.routeInfo.bodyParams;

    //返回结果
    var resultData = {};

    //查询用户id
    var  u_id = ""

    //查询命名空间id
    var n_id = ""

    //任务流创建
    async.waterfall([

        //查询命名空间
        //获取u_id
        //检查用户的在线状态
        (cb)=> {

            db.field('n_id').where({
                "n_appid" : bodyParams.severAppId
            }).select("socket_namespace",(rs) => {

                if(rs.length == 0){
                    return RES.errorResponse(res,"此appId不存在");
                }
                n_id = rs[0].n_id
                cb();
            })

        },

        (cb) => {
            db.field('u_id').where({
                "u_username"  : bodyParams.userId,
                "u_nid"       : n_id,
                "u_is_delete" : 0
            }).select("socket_user",(rs)=>{
                if(rs.length == 0){
                    return RES.errorResponse(res,"此用户不存在");
                }
                u_id = rs[0].u_id
                cb()
            })
        },
        (cb) => {
            socketObj._checkingUserStatus(u_id,(isTrue) => {
                resultData.isOnLine = isTrue
                cb()
            })
        }

    ],()=> {

        //返回最终拼接结果
        RES.successResponse(res,resultData);

    });
    
}